﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Templates/DefaultMaster.master" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="Templates_ccEnergyAudit1_Default" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server"></asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    
    <asp:Panel ID="pnlEnergyCalc" DefaultButton="btnEnter" CssClass="form" runat="server">
        <h1><asp:Image ID="Image2" ImageUrl="~/dbimages/h1-ccEa.gif" AlternateText="Pupil Numbers" runat="server" /></h1>
        <asp:Panel ID="pnlMenuDisabled" runat="server">
                      <div class="ccNav1">
                <ul>
                    <li><asp:Image ID="Image3" ImageUrl="~/dbimages/ccNav_pnActive.gif" AlternateText="Pupil Numbers" runat="server" /></li>
                    <li><asp:Image ID="Image8" ImageUrl="~/dbimages/ccNav_pnActive.gif" AlternateText="Energy Audit" runat="server" /></li>
                    <li><asp:Image ID="Image9" ImageUrl="~/dbimages/ccNav_pnActive.gif" AlternateText="Waste Audit" runat="server" /></li>
                </ul>
            </div>
        </asp:Panel>
    
        <asp:Panel ID="pnlMenuEnabled" Visible="false" runat="server">
             <div class="ccNav1">
                <ul>
                   <li><asp:HyperLink ID="lnkPupilNumbers" ImageUrl="~/dbimages/ccNav_pnOn.gif" ToolTip="Pupil Numbers"  NavigateUrl="PupilNumbers.aspx" runat="server"/></li>
                   <li><asp:Image ID="Image5" ImageUrl="~/dbimages/ccNav_eaActive.gif" AlternateText="Energy Audit" runat="server" /></li>
                   <li><asp:HyperLink ID="lnkWasteAudit" NavigateUrl="WasteAudit.aspx" ImageUrl="~/dbimages/ccNav_waOn.gif" ToolTip="Waste Audit" runat="server" /></li>
                </ul>
            </div>
        </asp:Panel>
        
        <div class="ccNav2">
            <ul>
                <li id="liAuditOneActive" runat="server" class="ccNav2Active">
                    <asp:HyperLink ID="lnkAuditOne" runat="server" Text="Audit One"/>
                </li>
                <li id="liAuditTwoOff" runat="server" class="ccNav2Off">Audit Two</li>
                <li id="liAuditTwoActive" runat="server" class="ccNav2Active">
                    <asp:HyperLink ID="lnkAuditTwo" runat="server" Text="Audit Two"/>
                </li>
                <li id="liAnalysisOff" runat="server" class="ccNav2Off">Analysis</li>
                <li id="liAnalysisActive" runat="server" class="ccNav2Active">
                    <asp:HyperLink ID="lnkAnalysis" runat="server" Text="Analysis"/>
                </li>
            </ul>
        </div>
        <h2><%# string.Format("{0} - {1}", AcmsContext.CurrentPost != null ? AcmsContext.CurrentPost.DisplayName : "Energy Audit", AuditNo) %></h2>
        
        <asp:ValidationSummary ID="valSummary" runat="server" DisplayMode="BulletList" HeaderText="Please correct the following errors and try again."
            ShowSummary="True" ShowMessageBox="False" />
        
        <asp:Panel ID="pnlErrors" CssClass="errorBox" Visible="false" EnableViewState="false" runat="server">
            <ul id="ulErrors" runat="server">
            </ul>
        </asp:Panel>
            
        <asp:Panel ID="pnlEnergyEntry" CssClass="calcContainer" runat="server">
            <ul class="form">          
                <li class="formItem">
                    <span class="formLabel">
                        <asp:Label ID="Label13" Text="kWh used in one week:" AssociatedControlID="txtKwH"
                        runat="server" />
                        <span style="color:Red">*</span>
                    </span>
                    <span class="forminput">
                        <asp:TextBox ID="txtKwH" runat="server" />
                        <asp:RequiredFieldValidator ID="valKwH" ErrorMessage="kWh are required"
                            ControlToValidate="txtKwH" Display="Dynamic" runat="server" />
                        <asp:CompareValidator ID="valKwHCV" ControlToValidate="txtKwH" Operator="GreaterThan" ValueToCompare="0" Type="Double" runat="server" ErrorMessage="The kWh needs to be greater than 0"></asp:CompareValidator>
                    </span>
                </li>
                 <li class="formItem buttons">
                    <span class="forminput">
                        <asp:Button ID="btnEnter" Text="Calculate your CO2" runat="server" OnClick="btnEnter_Click" />
                    </span>
                </li>
            </ul>
        </asp:Panel>
    
        <asp:Panel ID="pnlEnergyResults" Visible="false" runat="server">
          <asp:Image ID="Image1" ImageUrl="~/dbimages/ccBalloon.jpg" CssClass="imageCenter" AlternateText="Balloons" runat="server" />
          <h2><asp:Label runat="server" ID="lblAuditNumber" /> Your School Generated:</h2>
          
          <div>
            <p>
                <asp:Label ID="lblKGCO2Wk"  runat="server"/> kg CO<sub>2</sub> per week. This is enough gas to fill <asp:Label ID="lblIcKGCO2Wk" runat="server"/> party balloons!
            </p>
         </div>
         <div>
            <p>
                <asp:Label ID="lblTonCO2Yr" runat="server"/> Tons CO<sub>2</sub> per school year. This is enough gas to fill <asp:Label ID="lblIcTonCO2Yr" runat="server"/> jet planes!
            </p>
         </div>
         <asp:Button Text="Edit your data" ID="btnEditData" runat="server" OnClick="btnEditData_Click"/>
         <asp:Image ID="Image4" ImageUrl="~/dbimages/ccJet.jpg" CssClass="imageCenter" AlternateText="Jet" runat="server" />
        </asp:Panel>
    </asp:Panel>
</asp:Content>
